{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![openclassrooms](https://s3.eu-west-1.amazonaws.com/course.oc-static.com/courses/6204541/1+HnqdJ-5ofxiPP9HIxdNdpw.jpeg)\n",
    "\n",
    "# Initiez-vous à Python pour l'analyse de données\n",
    "\n",
    "## Programmez en orienté objet\n",
    "\n",
    "<br><br>\n",
    "\n",
    "**Les méthodes de chaines de caractères**\n",
    "\n",
    "Soit la variable `maPhrase` suivante :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "maPhrase = 'JE SUIS ENERVE !!'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Utilisez une méthode de chaines de caractères pour transformer la variable `maPhrase`  en minuscule :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "je suis enerve !!\n"
     ]
    }
   ],
   "source": [
    "maPhrase = maPhrase.lower()\n",
    "print(maPhrase)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Remplacez les **...** par une ligne permettant, à partir de la variable maPhrase d'afficher : `je suis calme !!`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "je suis calme !!\n"
     ]
    }
   ],
   "source": [
    "print(maPhrase.replace(\"enerve\", \"calme\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
